<template>
  <div>
    <Header></Header>
    <div class="article_list">

      <ul>
        <li class='list' v-for="item in list">
          <router-link :to="'/content/'+item.id">
            <div class='imgDiv'>
              <img v-bind:src="item.imgSrc" alt="">
            </div>
            <div class='contentDiv'>
              <h4>{{item.title}}</h4>
              <p>
                <span class='time'>
                  <time v-text="$utils.goodTime(item.shareTime)"></time>
                </span>
                <span class="fromWeb">{{item.fromName}}</span>
              </p>
            </div>
          </router-link>

        </li>
      </ul>
    </div>
    <Footer></Footer>
  </div>
</template>
<script>
import Header from '../components/header.vue'
import Footer from '../components/footer.vue'
export default {
  components: { Header, Footer },
  data () {
    return {
      list: []
    }
  },
  created () {
    this.getData()
  },
  methods: {
    getData () {
      this.$api.get('/pulunews/GetTenThousandProcNews?userId=f960ac10d8158042&currentIndex=1&pageSize=15',null, r => {
        var data=r.Data;
        for(var i=0;i<data.length;i++){
          var arr={};
          arr.id=data[i].id;
          arr.imgSrc=data[i].thumb;
          arr.title=data[i].title;
          arr.shareTime=data[i].published_date;
          arr.fromName=data[i].sitename;
          this.list.push(arr);
        }

      })
    },
    goPageOne(){
      
    }
  }
}
</script>